package com.szqhyxj.youxiangju.biz.realNameAuth.success;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.KeyEvent;
import android.view.View;

import com.szqhyxj.youxiangju.BaseActivity;
import com.szqhyxj.youxiangju.R;
import com.szqhyxj.youxiangju.biz.card.addCard.BindCardActivity;
import com.szqhyxj.youxiangju.biz.merchantHome.MerchantContainerActivity;
import com.szqhyxj.youxiangju.biz.policy.PolicyActivity;
import com.szqhyxj.youxiangju.sys.components.NavigationBar;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by leung on 2018/10/31.
 */

public class NameAuthenticationSuccessActivity extends BaseActivity implements NavigationBar.NavigationBarListener {
    @BindView(R.id.navigationBar)
    NavigationBar navigationBar;

    public static void start(Activity activity) {
        Intent intent = new Intent();
        intent.setClass(activity, NameAuthenticationSuccessActivity.class);
        activity.startActivity(intent);

    }

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_name_authentication_success);
        ButterKnife.bind(this);
        navigationBar.setNavigationBarListener(this);
    }

    @OnClick({R.id.toaddCreditCard})
    public void onClick(View view) {
        switch (view.getId()) {

            case R.id.toaddCreditCard:
                BindCardActivity.start(this);
                break;
        }
    }

    @Override
    public void navigationLeft() {
        MerchantContainerActivity.start(this,true);
    }

    @Override
    public void navigationRight() {

    }

    @Override
    public boolean onKeyDown(int keyCode, KeyEvent event) {
        if(keyCode==KeyEvent.KEYCODE_BACK){
            MerchantContainerActivity.start(this,true);
        }
        return super.onKeyDown(keyCode, event);
    }
}
